﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:SynergyControls"
                    >

    <!-- Region: BPM_Slider-->
    <Style TargetType="{x:Type local:BPM_Slider}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:BPM_Slider}">
                    <UserControl x:Name="LayoutRoot" 
                        Width="100"
                        Height="60"
                        HorizontalAlignment="Center"
                        >
                        <Border 
                            BorderThickness="2" 
                            
                                BorderBrush="{DynamicResource ControlBackgroundBrush}">
                            <Grid 
                                Background="{DynamicResource ControlForegroundBrush}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Slider 
                                    Grid.Row="1"
                                    Orientation="Horizontal" 
                                        HorizontalContentAlignment="Stretch" 
                                        VerticalContentAlignment="Stretch"
                                   
                    Maximum="208" 
                                    Minimum="40" 
                                    Interval="1" 
                                    Value="120" 
                                    VerticalAlignment="Stretch"
                                    Name="bpmSlider" 
                                    TickPlacement="BottomRight" 
                                    TickFrequency="1" 
                                    HorizontalAlignment="Stretch" 
                                    SmallChange="1" 
                                    IsSnapToTickEnabled="True" >


                                </Slider>

                                <StackPanel 
                                    Orientation="Horizontal">
                                    <Label 
                                    Grid.Row="0"
                                    Content="BPM" 
                                       FontSize="12" 
                                       HorizontalAlignment="Center" 
                                       Margin="0,0,0,0" 
                                       HorizontalContentAlignment="Center" 
                                       Name="lbl">
                                    </Label>
                                    <Label 
                                    Grid.Row="0"
                                    HorizontalAlignment="Center" 
                                        FontSize="12" 
                                        Name="labelBPM" 
                                        DataContext="{Binding ElementName=bpmSlider}" 
                                        Content="{Binding Path=Value, StringFormat=\{0:x\}}">
                                    </Label>
                                </StackPanel>
                            </Grid>
                        </Border>
                    </UserControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--EndRegion: BPM_Slider-->

</ResourceDictionary>